// pages/waitmassage/waitmassage.js
const { getAllDealMaintenanceList, operateGetDeal } = require("../../utils/api");
const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    myTitle:"已回复",
    isPoup:false,
    userInfo: null,
    navBarHeight:app.globalData.navBarHeight,
    allDealMaintenanceList: [],
  },
  goDetail(e) {
    wx.navigateTo({
      url: `/pages/detail/detail?sourceNavigate=repliedMessage&maintenanceNumber=${e.currentTarget.dataset.maintenancenumber}`,
    });
  },
 
  onLoad(options) {
    this.setData({
      userInfo: wx.getStorageSync('userInfo')
    })
    this.operateGetDeal();
  },
  handelback(){
    wx.navigateBack({
      delta:1
    })
  },

  operateGetDeal() {
    const data = { PhoneNumber: this.data.userInfo.PhoneNumber, };
    operateGetDeal(data).then(res => {
      if(res.code === 4002140) {
        this.setData({
          allDealMaintenanceList : res.data,
        });
      }
    })
  },
})